file = open(r"E:\python\a.txt", "r", encoding="utf8")

while True:
    txt = file.readline()
    # 如果readline读取到文件最后末尾,返回""
    if txt == "":
        break
    print(txt, end="")

file.close()
